package com.jcl.recruit.console;

import com.jcl.recruit.console.mapper.ConsoleUserTokenMapper;
import com.jcl.recruit.console.model.ConsoleUserToken;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName ConsoleUserTokenDao
 * @Author yyliu
 * @Date 2018/12/14 9:41
 * @Version 1.0
 **/
@Component
public class ConsoleUserTokenDao implements ConsoleUserTokenMapper {

    @Autowired
    private ConsoleUserTokenMapper  consoleUserTokenMapper;

    @Override
    public ConsoleUserToken findOne(String corpCode, Integer userId) {
        return consoleUserTokenMapper.findOne(corpCode, userId);
    }

    @Override
    public int updateToken(String corpCode, Integer userId, String token) {
        return consoleUserTokenMapper.updateToken(corpCode, userId, token);
    }

    @Override
    public int add(ConsoleUserToken entity) {
        return consoleUserTokenMapper.add(entity);
    }

    @Override
    public int update(ConsoleUserToken entity) {
        return consoleUserTokenMapper.update(entity);
    }
}
